﻿using Engine;
using Game;
//粉碎机
namespace Mekiasm
{
    public class EnrichWidget : BaseEnergyWidget
    {
        public ComponentEnrich componentEnrich;
        public EnrichWidget(ComponentEnrich componentEnrich_, ComponentMiner componentMiner) : base(componentMiner)
        {
            componentEnrich = componentEnrich_;
            MekCraftingRecipe.FindCraftDevice(typeof(MekEnrich)).GenerateRecipeWidget(CanvasMain,componentEnrich,componentMiner, ref Tick);
            setTitle("富集仓");
        }

        public override void Update()
        {
            SetPowerProgress((float)componentEnrich.Power / (float)componentEnrich.MaxPower);
            SetLeftBottomMoreInfo($"消耗:{ILibrary.FormatPower(componentEnrich.OutputPowerLimit)}\n当前储能:{ILibrary.FormatPower(componentEnrich.Power)}\n最大:{ILibrary.FormatPower(componentEnrich.MaxPower)}");
        }
    }
}
